#include "mainwidget.h"
#include "ui_mainwidget.h"

MainWidget::MainWidget(QWidget *parent) :
    QWidget(nullptr), //修改参数为空指针
    ui(new Ui::MainWidget)
{
    ui->setupUi(this);  //修改构造函数
    this->login = parent;
    back = new BackWidget(login);//把login作为参数传过去
}

MainWidget::~MainWidget()
{
    delete ui;
}

void MainWidget::on_pushButton_clicked()
{
    this->close();
    back->show();
}
